<?php
/**
 * Created by PhpStorm.
 * User: cyc
 * Date: 2017/11/2
 * Time: 下午4:12
 */

abstract class ConfigDecorator
{
    use util_array;
    protected $_config;
    public function __construct(MsggConfig $config)
    {
        $this->_config = $config;
    }

    public static function getLastModify()
    {
       return MsggConfig::getLastModify();
    }

    public function getId()
    {
        return $this->_config->id;
    }

    public function getName()
    {
        return $this->_config->name;
    }

    public function getStatus()
    {
        return $this->_config->status;
    }

    public function getTry(){
        return $this->_config->try;
    }

    public function getConfigValue($key,$default=null)
    {
        return self::util_array_get($this->_config->getConfig(), $key, $default);
    }

    public function getOriginConfig()
    {
        return $this->_config;
    }

}